package com.etc.team2.service;

import java.util.ArrayList;
import java.util.List;

import com.etc.team2.bean.Station;
import com.etc.team2.dao.StationDAO;

public class StationService {
	private StationDAO dao=null;
	
	public StationService()
	{
		dao=new StationDAO();
	}
	
	public List<Station> getAllStation()
	{
		List<Station> list=new ArrayList<Station>();
		list=dao.AllStation();
		return list;
	}
	public Station getStation(String stationName)
	{//用于返回客户搜索的站台信息，调用StationDAO中的getStation()方法
		
     	return dao.getStation(stationName);

	}
	public boolean addStation(Station station)
	{/*
	*调用StationDAO中的addStation方法
	**/
		return dao.addStation(station);
	}
	public boolean deleteStation(int stationId)
	{/*
	*调用StationDAO中的deleteStation方法
	*
	**/
		return dao.deleteStation(stationId);
	
	}
	
	public List<String> searchStation(String stationText)
	{
		List<String> list=dao.searchStation(stationText);
		return list;
	}
	

}
